//
//  Category.m
//  reacticons
//
//  Created by Nong Trung Nghia on 9/10/12.
//
//

#import "Category.h"
#import "Items.h"
@implementation Category
@synthesize categoryIsDisplayed;
@synthesize categoryName;
@synthesize categoryThumbnailPath;

- (void)parseFromItem:(Items*)item{
    for (NSString *key in [item allKeys]) {
        [self setValue:[item valueForKey:key] forKey:key];
    }
    
}

- (Items*)itemObject{
    Items * item = [[Items alloc] initWithKeys:[NSArray arrayWithObjects:
                                                @"categoryIsDisplayed",
                                                @"categoryName",
                                                @"categoryThumbnailPath",
                                                nil]];
    
    for (NSString *key in [item allKeys]) {
        [item setValue:[self valueForKey:key] forKey:key];
    }
    
    return [item autorelease];
}


@end
